package com.example.administrator.zuce;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class zhucejiemian extends AppCompatActivity {

    String [] yonghuming = new String[20];
    String [] mima = new String[20];
    String [] qrmima = new String[20];

    String bcyonghuming;//保存用户名
    String bcmima;//保存密码
    String bcqrmima;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zhucejiemian);

        final EditText zcyonghuming = (EditText)findViewById(R.id.yonghuming);
        final EditText zcmima = (EditText)findViewById(R.id.mima);
        final EditText zcqrmima = (EditText)findViewById(R.id.querenmima);
        Button tijiao = (Button)findViewById(R.id.tijiao);

        //获取输入的数据
        zcyonghuming.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                bcyonghuming = zcyonghuming.getText().toString();
            }
        });

        zcmima.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                bcmima = zcmima.getText().toString();
            }
        });

        zcqrmima.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                bcqrmima = zcqrmima.getText().toString();
            }
        });

    tijiao.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //保存注册数据
            for(int i = 0; i < yonghuming.length; i++){
                bcyonghuming = yonghuming[i];
            }

            for(int i = 0; i < mima.length; i++){
                bcmima = mima[i];
            }

            for(int i = 0; i < qrmima.length; i++) {
                bcqrmima = qrmima[i];
            }
            Intent intent = new Intent();
            intent.setClass(zhucejiemian.this,ZuCe.class);
            startActivity(intent);
        }
    });

    }
}
